﻿
@{
    ViewData["Title"] = "用户认证列表";
}

@section Scripts
    {
    <link href="~/css/page.css" rel="stylesheet" />
    <script type="text/html" id="barAction">
        @*<a class="layui-btn layui-btn-xs" lay-event="edit">市场信息</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>*@
    </script>
    <script type="text/javascript">
        var selfLayer = null, page = 1, active = null;
        layui.use(['layer', 'table', 'laydate'], function () {
            var layer = layui.layer //弹层
                ,
                table = layui.table, form = layui.form; //表格
            layui.laydate.render({
                elem: '#RecordTime',
                type: 'month',
                range: true
            })

            var item = '@ViewData["Id"]';

            console.log(item);

            //执行一个 table 实例
            table.render({
                id: 'dataList',
                elem: '#dataview',
                height: 'full-80',
                url: "/UserAttest/UserAttestUnitAll?userAttestId="+'@ViewData["Id"]',
                request: {
                    pageName: 'index' //页码的参数名称，默认：page
                    , limitName: 'size' //每页数据量的参数名，默认：limit

                },
                parseData: function (res) { //res 即为原始返回的数据
                    console.log(res);
                    return {
                        "code": res.Code, //解析接口状态
                        "msg": res.msg, //解析提示文本
                        "count": res.total, //解析数据长度
                        "data": res.result.data //解析数据列表
                    };
                },
                response: {
                    statusCode: 200 //规定成功的状态码，默认：0
                },
                done: function (res, curr, count) {
                    page = curr;
                },
                page: true,
                cols: [
                    [
                        { field: 'unitName', title: '市场名称' },
                        { field: 'address', title: '市场地址' },
                        { field: 'areaName', title: '地区' },
                        { field: 'remarks', title: '备注' },
                        { field: 'createTime', title: '时间' },
                    ]
                ]
            });
        });
    </script>
}


<blockquote class="layui-elem-quote layui-text layui-form">
    <div class="layui-form-label">
        <button class="layui-btn" id="search" style="width: 60px; height: 28px; line-height: 28px; display: inline" data-type="reload">返回</button>
    </div>
</blockquote>
<br />
<div id="main" style="height: 10px; width: 100%;"></div>
<script src="~/js/jquery.min.js"></script>
<script>
    $(function () {
        $("#search").click(function () {
            window.location.href = "/UserAttest/Index";
        })
    })
</script>
<table class="layui-hide" id="dataview" lay-filter="datalist"></table>

